import fetch from "@/utils/fetch";

export const getArticleList =(data)=>{
    return fetch({
        method:"post",
        url:"/bl-article/queryAll",
        data,
    })
}

export const getArticleInfo = (id)=>{
    return fetch({
        method:"get",
        url:`/bl-article/getArticleInfo?id=${id}`,
    })
}


export const addArticle = (data)=>{
    return fetch({
        method:"post",
        url:"/bl-article/add",
        data,
    })
}

export const getArticleByUserId = (data)=>{
    return fetch({
        method:"post",
        url:"/bl-article/queryByuserId",
        data,
    })
}

export const queryComment = (id)=>{
    return fetch({
        method:"get",
        url:`/bl-article/commentNews?id=${id}`
    })
}


export const addComment = (data)=>{
    return fetch({
        method:"post",
        url:'/bl-article/addNews',
        data,
    })
}